#if defined(TSINGMA_MX) || defined(TSINGMA_GX) || defined(ARCTIC)

extern int32
sys_tmm_acl_init(uint8 lchip);
extern void
sys_tmm_acl_deinit(uint8 lchip);

extern int32
sys_tmm_acl_set_flex_key_fields(uint8 lchip, ctc_acl_flex_key_t* acl_flex_key);
extern int32
sys_tmm_acl_get_flex_key_fields(uint8 lchip, ctc_acl_flex_key_t* acl_flex_key);
extern void*
sys_tmm_acl_get_flex_key(uint8 lchip, uint8 dir, uint8 key_type);
extern int32
sys_tmm_acl_show_flex_keygen(uint8 lchip, uint8 dir, uint8 key_type, uint32 eid, uint32* data);
extern int32
sys_tmm_acl_create_presel(uint8 lchip, ctc_acl_presel_t* acl_presel);
extern int32
sys_tmm_acl_destroy_presel(uint8 lchip, uint16 presel_id);
extern int32
sys_tmm_acl_add_presel_fields(uint8 lchip, uint16 presel_id, uint8 fields_cnt, ctc_field_key_t *fields);
extern int32
sys_tmm_acl_remove_presel_fields(uint8 lchip, uint16 presel_id, uint8 fields_cnt, ctc_field_key_t *fields);

extern int32
sys_tmm_acl_add_presel(uint8 lchip, uint32 presel_id);

extern int32
sys_tmm_acl_remove_presel(uint8 lchip, uint32 presel_id);
#if 0
extern int32
sys_tmm_acl_create_group(uint8 lchip,
                         uint32 group_id,
                         ctc_acl_group_info_t* group_info);

extern int32
sys_tmm_acl_destroy_group(uint8 lchip,
                          uint32 group_id);

#endif
extern int32
sys_tmm_acl_alloc_tcam_entry(uint8 lchip,
                             void* pg,
                             void* pe);


extern int32
sys_tmm_acl_free_tcam_entry(uint8 lchip,
                             void* pg,
                             void* pe);

extern int32
sys_tmm_acl_build_key_field(uint8 lchip,
                        ctc_field_key_t* pKey,
                        void* pe,
                        uint8 is_add);


extern int32
sys_tmm_acl_get_key_field(uint8 lchip, void* pe_info, ctc_field_key_t* pKey, uint32* key_width);

extern int32
sys_tmm_acl_show_key_field(uint8 lchip, void* pe, uint8 show_inner);


extern int32
sys_tmm_acl_build_presel_field(uint8 lchip,
                               uint32 entry_id,
                               ctc_field_key_t* key_field,
                               uint8 is_add);


extern int32
sys_tmm_acl_add_egs_action_field(uint8 lchip, ctc_acl_field_action_t* action_field,
                                 void* pe_info, uint8 is_add);
extern int32
sys_tmm_acl_get_egs_action_field(uint8 lchip, ctc_acl_field_action_t* action_field, void* pe_info);
extern int32
sys_tmm_acl_set_league_mode_flex(uint8 lchip, ctc_acl_league_t* league, uint8* p_sub_blk_cnt, uint8* sub_blk, uint8* p_op_mode);

extern int32
sys_tmm_acl_expand_link_block(uint8 lchip, void* pb, void* fk, uint8 part_num);

extern int32
sys_tmm_acl_compress_link_block(uint8 lchip, void *pb, void* fk);

extern uint8
sys_tmm_acl_get_league_update_flag(uint8 lchip, uint8 dir, uint8 is_port, uint8 is_vlan, uint8 is_l3if);

extern int32
sys_tmm_acl_add_compress_ether_type(uint8 lchip, uint8 is_global, uint8 dir, uint16 new_ether_type, uint16 old_ether_type,uint8* o_cether_type, uint8* o_cether_type_index);

extern int32
sys_tmm_acl_remove_compress_ether_type(uint8 lchip, uint8 is_global, uint8 dir, uint16 ether_type);

extern int32
sys_tmm_acl_add_udf_entry(uint8 lchip,  ctc_acl_classify_udf_t* p_udf_entry);

extern int32
sys_tmm_acl_copy_presel_key_ad(uint8 lchip, uint8 slice_id, uint8 src_block, uint8 dst_block, uint8 is_league_inner);

extern int32
sys_tmm_acl_set_league_global_config(uint8 lchip, void* config);
extern int32
sys_tmm_acl_reorder_entry(uint8 lchip, ctc_acl_reorder_t* reorder);
extern int32
sys_tmm_acl_replace_block(uint8 lchip, ctc_acl_replace_t* p_replace);

#endif

